<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        {{msg}}
      <fancy-button>登录</fancy-button>
      <fancy-button>注册</fancy-button>
      <fancy-button>{{msg}}</fancy-button>
      <fancy-button></fancy-button>
    </div>

    <template id="fancButton">
      <button>
        <slot>按钮</slot>
      </button>
    </template>
    <script src="../lib/vue.global.js"></script>
    <script>
      Vue.createApp({
        data() {
          return {
            msg: "你好",
          };
        },
        components: {
          FancyButton: {
            template: "#FancyButton",
          },
        },
      }).mount("#app");
    </script>
  </body>
</html>